package com.project.bean;

import java.util.List;


public class Features {
	
	private Integer featureId;
	
	private String featureName;
	
	private String featureDescription;
	
	private String featureLink;
		
	private List<Function> functions;
	
	private Boolean active;

	/**
	 * @return the featureId
	 */
	public Integer getFeatureId() {
		return featureId;
	}

	/**
	 * @param featureId the featureId to set
	 */
	public void setFeatureId(Integer featureId) {
		this.featureId = featureId;
	}

	/**
	 * @return the featureName
	 */
	public String getFeatureName() {
		return featureName;
	}

	/**
	 * @param featureName the featureName to set
	 */
	public void setFeatureName(String featureName) {
		this.featureName = featureName;
	}

	/**
	 * @return the active
	 */
	public Boolean getActive() {
		return active;
	}

	/**
	 * @param active the active to set
	 */
	public void setActive(Boolean active) {
		this.active = active;
	}

	/**
	 * @return the featureDescription
	 */
	public String getFeatureDescription() {
		return featureDescription;
	}

	/**
	 * @param featureDescription the featureDescription to set
	 */
	public void setFeatureDescription(String featureDescription) {
		this.featureDescription = featureDescription;
	}

	/**
	 * @return the featureLink
	 */
	public String getFeatureLink() {
		return featureLink;
	}

	/**
	 * @param featureLink the featureLink to set
	 */
	public void setFeatureLink(String featureLink) {
		this.featureLink = featureLink;
	}

	/**
	 * @return the functions
	 */
	public List<Function> getFunctions() {
		return functions;
	}
	
	public String getFunctionToString() {
		String result = "";
		
		for (Function func : functions) {
			if (!result.equals("")) {
				result += ",";
			}
			result += func.getName();
		}
		
		return result;
	}
	
	/**
	 * @param functions the functions to set
	 */
	public void setFunctions(List<Function> functions) {
		this.functions = functions;
	}
}
